<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ShakePHP</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="#id1141017" title="ShakePHP" /><link rel="next" href="#id1141211" title="What is ShakePHP?" /></head><body><div class="article" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id1141017"></a>ShakePHP</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Leandro</span> <span class="surname">Mattioli</span></h3><div class="affiliation">
        <span class="orgname"><br /></span>
      </div></div></div><div><p class="pubdate">July, 2009</p></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#id1141211">What is ShakePHP?</a></span></dt><dd><dl><dt><span class="section"><a href="#id1141259">Advantages of ShakePHP</a></span></dt><dt><span class="section"><a href="#id1141324">Disadvantages of ShakePHP</a></span></dt></dl></dd><dt><span class="section"><a href="#id1141372">Installing and configuring ShakePHP</a></span></dt><dt><span class="section"><a href="#id1141381">The To-Do List Tutorial</a></span></dt><dt><span class="section"><a href="#id1141392">The Blog Tutorial</a></span></dt></dl></div>
  

  <div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id1141211"></a>What is ShakePHP?</h2></div></div></div>
    

    <p>ShakePHP is a small set of files that helps on creating web
    applications using the <abbr class="abbrev">MVC</abbr> design pattern. For its size
    and simplicity, I have my doubts if it can be called a framework. So the
    big question is: why use ShakePHP instead of a big framework. Well, first
    of all, I'd like to remark that many PHP frameworks transmits the false
    ilusion that things are automatic. However, when you try to customize
    things to make them exactly what you want, you may realize that you'll
    write much more code.</p>

    <p>Although I haven't tested all frameworks available, I would
    recommend you to use Django or Google App Engine to develop big web
    applications. But suppose that, for some reason, you can't use these
    technologies. For example, suppose the remote server you're working on has
    only <span class="emphasis"><em>mod-php</em></span> and you don't have administration
    privileges for installing Django. In this situation, you could try to use
    CakePHP, for example, but then you realize that your remote server also
    doesn't have <span class="emphasis"><em>mod-rewrite</em></span> enabled and the parameter
    <span class="emphasis"><em>AllowOverride</em></span> for your account is set to
    <span class="emphasis"><em>AuthConfig</em></span> (should I have mentioned that I'm talking
    about Apache?). This is a situation where ShakePHP would fit well.</p>

    <p>Another good example of situation where using ShakePHP could bring
    some benefits is when you have a web site that is 90% static and the other
    10% are related to contact forms, photo galleries, news, etc. It would be
    great if you could use the <abbr class="abbrev">MVC</abbr> design pattern only in
    those 10% and forget about Controllers, Models and Views to the other 90%.
    Of course, if you're using a big framework, you can configure Routes,
    create individual dummy Controllers for each static page or create a
    controller named StaticController... I consider these approaches
    “workarounds” for the problem that you cannot leave <abbr class="abbrev">MVC</abbr>
    when using those frameworks.</p>

    <div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="id1141259"></a>Advantages of ShakePHP</h3></div></div></div>
      

      <p>Considering the problems mentioned earlier, ShakePHP offers the
      following advantages:</p>

      <div class="itemizedlist"><ul type="disc"><li>
          <p>You probably won't need to change your server
          configuration;</p>
        </li><li>
          <p>You can easily select which pages are going to use the MVC
          approach, leaving to the others only the templating system, for
          example;</p>
        </li><li>
          <p>It's very small, meaning that you can easily modify the core
          to your needs;</p>
        </li><li>
          <p>You can use hierarchy of templates, as in Django;</p>
        </li><li>
          <p>No magic to manage the URLs, the simplicity of PHP remains
          untouched;</p>
        </li><li>
          <p>Uses a well-known database abstraction library (ADOdb).</p>
        </li></ul></div>
    </div>

    <div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="id1141324"></a>Disadvantages of ShakePHP</h3></div></div></div>
      

      <p>Consider the following items before diving into ShakePHP:</p>

      <div class="itemizedlist"><ul type="disc"><li>
          <p>No Object-relational mapping (ORM) yet, meaning that you'll
          write your SQL for your models;</p>
        </li><li>
          <p>No helpers for HTML and AJAX;</p>
        </li><li>
          <p>No flow control, like Java Managed Beans, yet;</p>
        </li><li>
          <p>No tag libraries, like J2EE, yet.</p>
        </li></ul></div>
    </div>
  </div>

  <div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id1141372"></a>Installing and configuring ShakePHP</h2></div></div></div>
    

    <p>(To-Do)</p>
  </div>

  <div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id1141381"></a>The To-Do List Tutorial</h2></div></div></div>
    

    <p>(To-Do)</p>
  </div>

  <div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id1141392"></a>The Blog Tutorial</h2></div></div></div>
    

    <p>(To-Do)</p>
  </div>
</div></body></html>
